/**
 * 
 */
package com.example.android_is2;

import java.util.ArrayList;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

/**
 * @author KAIN-PC
 *
 */
public class AdapterListTextView extends BaseAdapter{

  private ArrayList<TextView> listView = null;
  private Context classContext= null;
  
  public AdapterListTextView(ArrayList<TextView> listView, MapRouteActivitySelection mapRouteActivitySelection) {
    // TODO Auto-generated constructor stub
    this.listView = listView;
    this.classContext = mapRouteActivitySelection;
  }
  
  public AdapterListTextView(ArrayList<TextView> listView, OpenMapRouteActivity openRouteActivitySelection) {
    // TODO Auto-generated constructor stub
    this.listView = listView;
    this.classContext = openRouteActivitySelection;
  }
  
  public AdapterListTextView(ArrayList<TextView> listView, OpenTrackRouteActivity openRouteActivitySelection) {
    // TODO Auto-generated constructor stub
    this.listView = listView;
    this.classContext = openRouteActivitySelection;
  }
  
  public int getCount() {
    // TODO Auto-generated method stub
    return this.listView.size();
  }

  public Object getItem(int position) {
    // TODO Auto-generated method stub
    return this.listView.get(position);
  }

  public long getItemId(int position) {
    // TODO Auto-generated method stub
    return position;
  }

  public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    TextView view = (TextView) convertView;
    if (null == view) {
        view = new TextView(this.classContext);
    }
    view = (listView.get(position));
    return view;
  }

}

